

package com.hazelcast.internal.jmx.suppliers;

import com.hazelcast.internal.monitor.impl.LocalMultiMapStatsImpl;
import com.hazelcast.multimap.LocalMultiMapStats;
import com.hazelcast.multimap.MultiMap;

/**
 * Implementation of {@link StatsSupplier} for {@link LocalMultiMapStats}
 */
public class LocalMultiMapStatsSupplier implements StatsSupplier<LocalMultiMapStats> {

    private final MultiMap multiMap;

    public LocalMultiMapStatsSupplier(MultiMap multiMap) {
        this.multiMap = multiMap;
    }

    @Override
    public LocalMultiMapStats getEmpty() {
        return new LocalMultiMapStatsImpl();
    }

    @Override
    public LocalMultiMapStats get() {
        return multiMap.getLocalMultiMapStats();
    }
}
